// preload.js
const { ipcRenderer } = require('electron');

window.addEventListener('message', (event) => {
  if (event.source !== window) return;
  const message = event.data;

  if (message?.from === 'extension-content' && message?.type === 'finishTask') {
    ipcRenderer.send('from-content-finish-task', message.data);
  }
});
